package com.vhall.component.entity.chat.vo;


import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author xianglei
 * @date 2021/4/25 16:15
 */
@Data
public class ChatListReqVo implements Serializable {
    private static final long serialVersionUID = -3688293684737147834L;

    @ParamName("vss_token")
    private String vssToken;

    @NotBlank(message = "参数异常")
    @Pattern(regexp = "[0-9a-zA-Z_]{1,32}", message = "roomId参数格式异常")
    @ParamName("room_id")
    private String roomId;

    @ParamName("page")
    private Integer currPage;

    @ParamName("page_size")
    private Integer pageSize;

    @ParamName("start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startDate;

    @ParamName("end_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;

    @ParamName("order_by")
    private String orderBy = "desc";

    private String type = "all";
}
